package com.lance.answer.gui.answer.gk.answer.lms.batch.dto;

import com.alibaba.fastjson.JSONObject;
import com.lance.answer.dto.CompleteInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.commons.io.IOUtils;

import java.io.FileInputStream;
import java.io.InputStream;
import java.util.List;

/**
 * 记录每个课程的形考任务信息
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class CourseConfig {

    String courseName;
    String courseCode;
    int quizSize;
    int topicSize;
    int textSize;
    int requireScore = 0;

    public static void main(String[] args) throws Exception{
        String courseConfigStr = IOUtils.toString(new FileInputStream("libs//config//courseConf.json"), "UTF-8");
        List<CourseConfig> CourseConfigList = JSONObject.parseArray(courseConfigStr, CourseConfig.class);
        System.err.println(CourseConfigList);
    }

}
